﻿using System.ComponentModel.DataAnnotations;
using ExcellentCRM.DataService.Models;

namespace ExcellentCRM.Site.Models
{
    public class SearchStuClientModel : SearchModel<StuClient>
    {
        public StuClient StuClient { get; set; }

        [StringLength(30)]
        [Display(Name = "客户姓名")]
        public string StuName
        {
            get
            {
                return StuClient == null || StuClient.StudentInfo == null
                           ? null
                           : StuClient.StudentInfo.StuName;
            }
            set
            {
                if (StuClient != null && StuClient.StudentInfo != null)
                    StuClient.StudentInfo.StuName = value;
            }
        }
    }
}